/**
 * 
 */
package com.yangtao.prototype.system.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yangtao.framework.hibernate.BaseEntity;

/**
 * @author 杨涛
 * 
 */
@Entity
@Table(name = "sys_log_note")
public class LogNote extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 用户Id
	 */
	@Column(length=32)
	private String userId;
	/**
	 * 用户名称
	 */
	@Column(length=50)
	private String userName;

	/**
	 * 用户登录IP地址
	 */
	@Column(length = 32)
	private String clientIp;
	/**
	 * 客户地址
	 */
	@Column(length = 200)
	private String clientAddress;
	/**
	 * 登陆时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date logInTime;
	/**
	 * 退出时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date logOutTime;
	/**
	 * 登陆时间
	 */
	@Column(length = 200)
	private String logTime;
	/**
	 * 用户状态
	 */
	@Column(length = 10)
	private String state;

	public void createOrgLog(Organize org) {
		this.clientAddress = org.getDesription();
	}

	/**
	 * @return the userId
	 */
	public String getUserId() {
		return userId;
	}



	/**
	 * @param userId the userId to set
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}



	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}



	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}



	/**
	 * @return the logInTime
	 */
	public Date getLogInTime() {
		return logInTime;
	}

	/**
	 * @param logInTime
	 *            the logInTime to set
	 */
	public void setLogInTime(Date logInTime) {
		this.logInTime = logInTime;
	}

	/**
	 * @return the logOutTime
	 */
	public Date getLogOutTime() {
		return logOutTime;
	}

	/**
	 * @param logOutTime
	 *            the logOutTime to set
	 */
	public void setLogOutTime(Date logOutTime) {
		this.logOutTime = logOutTime;
	}

	/**
	 * @return the clientIp
	 */
	public String getClientIp() {
		return clientIp;
	}

	/**
	 * @param clientIp
	 *            the clientIp to set
	 */
	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	/**
	 * @return the clientAddress
	 */
	public String getClientAddress() {
		return clientAddress;
	}

	/**
	 * @param clientAddress
	 *            the clientAddress to set
	 */
	public void setClientAddress(String clientAddress) {
		this.clientAddress = clientAddress;
	}

	/**
	 * @return the logTime
	 */
	public String getLogTime() {
		return logTime;
	}

	/**
	 * @param logTime
	 *            the logTime to set
	 */
	public void setLogTime(String logTime) {
		this.logTime = logTime;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state
	 *            the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

}
